package pcrc.app;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.EditText;

public class WritingActivity extends Activity {
    /** Called when the activity is first created. */
	InputMethodManager mImm;
    EditText edittitle;
    EditText editstc;   
    
    Intent intent = getIntent();
    final static int ACT_LIST = 0;
    
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        edittitle = (EditText)findViewById(R.id.edittitle);
        editstc = (EditText)findViewById(R.id.editstc);
        
        mImm = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
        mImm.showSoftInput(edittitle, 0);
    
    
    
        Button cancle = (Button)findViewById(R.id.cancle);
        cancle.setOnClickListener(new Button.OnClickListener() {
        	public void onClick(View v) {
        		//Intent intent = new Intent(WritingActivity.this, ListActivity.class);
        		//startActivityForResult(intent, ACT_LIST);
        		
        		setResult(RESULT_CANCELED);
        		finish();
        	}
        });
	}
    
//    protected void onActivityResult (int requestCode, int resultCode, Intent data) {
//    	switch (requestCode) {
//    	
//    	}
//    	
//    }
}

